package com.damei.qmui_test_demo.base;

import android.os.Bundle;

import com.damei.qmui_test_demo.R;
import com.damei.qmui_test_demo.activity.AssetsActivity;
import com.damei.qmui_test_demo.activity.HomeActivity;
import com.damei.qmui_test_demo.activity.MineActivity;
import com.damei.qmui_test_demo.activity.StoreActivity;
import com.damei.qmui_test_demo.activity.TrendsActivity;
import com.damei.qmui_test_demo.utils.BottomBar;

import butterknife.BindView;
import butterknife.ButterKnife;

public class TabBarActivity extends BaseActivity {

    @BindView(R.id.bottom_tab_bar)
    BottomBar tabBar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_tabbar);
        ButterKnife.bind(this);

        tabBar.setContainer(R.id.fl_container)
                .setTitleBeforeAndAfterColor("#8E8E93", "#CD3232")
                .addItem(HomeActivity.class,
                        "首页",
                        R.drawable.home_icon_nor,
                        R.drawable.home_icon_pre)
                .addItem(StoreActivity.class,
                        "门店",
                        R.drawable.mendian_icon_nor,
                        R.drawable.mendian_icon_pre)
                .addItem(AssetsActivity.class,
                        "资产",
                        R.drawable.zhican_icon_nor,
                        R.drawable.zhican_icon_pre)
                .addItem(TrendsActivity.class,
                        "客户",
                        R.drawable.client_icon_nor,
                        R.drawable.client_icon_pre)
                .addItem(MineActivity.class,
                        "我的",
                        R.drawable.mine_icon_nor,
                        R.drawable.mine_icon_pre)
                .setIconWidth(24)
                .setIconHeight(24)
                .setFirstChecked(0)
                .build();
    }
}
